<template functional>
  <div :class="['user', props.index === 0?'active':'']" @click="props.choose(props.index)">
      <img :src="props.item.avatarUrl" class="head">
      <div class="nickname"> {{props.item.nickname}} </div>
  </div>
</template>

<style lang="scss" scoped>
.user.active  {
    transition: .2s;
    background: var(--color-primary-bg);
}
.user  {
    margin-right: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    padding: 12px 12px 12px 16px;
    border-radius: 8px;
    width: 256px;
    transition: .2s;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.user  {
    margin-right: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    padding: 12px 12px 12px 16px;
    border-radius: 8px;
    width: 256px;
    transition: .2s;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.user .head  {
    border-radius: 50%;
    height: 44px;
    width: 44px;
}
.user.active .nickname  {
    color: var(--color-primary);
}
.user .nickname  {
    font-size: 18px;
    margin-left: 12px;
}

</style>
